<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>分店总经理采购审核</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="../../res/css/wholesale/font.css">
  <link rel="stylesheet" href="../../res/css/wholesale/xadmin.css">
  <link rel="stylesheet" href="../../res/layui/css/layui.css">
  <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  <script type="text/javascript" src="../../res/layui/layui.js" charset="utf-8"></script>
  <script type="text/javascript" src="../../res/js/wholesale/xadmin.js"></script>
</head>
<body>
<div class="demoTable" style="margin-top: 10px;">
    <div class="x-body" >
      <div class="layui-row">
        <div class="layui-form layui-col-md12 x-so">
        <input type="text" name="id" id="demoReload" placeholder="请输入备注" autocomplete="off" class="layui-input">
         	 时间：
		     <input class="layui-input" placeholder="开始日" name="timaStart" id="timaStart" readonly>
          - <input class="layui-input" placeholder="截止日" name="timeEnd" id="timeEnd" readonly>
		           
		    
          <button class="layui-btn" data-type="reload" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </div>
     </div>
<table class="layui-table" lay-data="{url:'../../listenPurchase/selectManagerMusicState.action', page:true, id:'idTest'}" lay-filter="demo">
  <thead>
    <tr>
      <th lay-data="{field:'purchaseId', width:150,style='display:none'}">采购Id</th>
      <th lay-data="{field:'purchaseStringTime', width:200, align:'center'}">采购时间</th>
      <th lay-data="{field:'purchasePrice', width:200, align:'center'}">采购金额</th>
      <th lay-data="{field:'auditingStatus',width:200, align:'center',templet:'#auditingStatusType'}">审核状态</th>
      <th lay-data="{field:'purchaseNumber', width:150, align:'center'}">采购数量</th>
      <th lay-data="{field:'purchaseExplain', width:200, align:'center'}">采购说明</th>
      <th lay-data="{field:'oper', width:120, align:'center'}">操作人</th>
     <!--  <th lay-data="{field:'isva', width:120, align:'center'}">是否有效</th>
      <th lay-data="{field:'openTime',width:120, align:'center'}">操作时间</th>
       -->
      <!-- <th lay-data="{field:'sort', width:200, align:'center'}">排序</th> -->
      <th lay-data="{field: 'right', width:250, align:'center', fixed: 'right', toolbar: '#barDemo'}">操作</th>
    </tr>
  </thead>
</table>

 </div>
 </div>

<script type="text/html" id="barDemo">
  
  {{ subMitType(d) }}
</script>
 <script type="text/html" id="auditingStatusType">
     {{# if(d.auditingStatus == 1) { }}
     <div>等待分店财务审核</div>
 	 {{# } else if(d.auditingStatus == 2){ }}
     <div>财务已审核，等待分店总经理审核</div>
	 {{# } else if(d.auditingStatus == 3){ }}
     <div>已审核</div>
     {{# } else if(d.auditingStatus == 4){ }}
     <div>未通过审核</div>
{{# }}}
 </script>

 <script type="text/javascript">
 	function subMitType(d){
 		var  Subhtml = "";
 		
 			Subhtml='<a class="layui-btn layui-btn-danger layui-btn-xs " lay-event="audit">审核</a><a class="layui-btn layui-btn-xs" lay-event="auditDetail">审核记录</a><a class="layui-btn layui-btn-xs" lay-event="detail">查看详情</a>';
 		
 		
 		return Subhtml;
 	}
 </script>  
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script type="text/javascript" src="../../res/js/managerPurchaseAudit/managerPurchaseAudit.js"></script>
</body>
</html>